package ca.uvic.group2.beans;

//import java.io.Serializable;

public class PurchaseOrderBean
{
	public static final int BUY = 0;
	public static final int SELL = 1;
	public static final int ADD_FUNDS = 2;

	private int kind;
	private QuoteBean quote;
	private int amount;
	private float total;
	private long expiry;
//	public long expiry = System.currentTimeMillis() + 60000;

	/**
	 * Used for SELL commands.  References the user's existing stock inventory.
	 */
	public StockRecordBean existingInventory;

	public PurchaseOrderBean(int kind) 
	{
		setKind(kind);
	}

	public PurchaseOrderBean(PurchaseOrderBean src) 
	{
		setKind(src.kind);
		setQuote(src.quote);
		setAmount(src.amount);
		setTotal(src.total);
		setExpiry(src.expiry);
		setExistingInventory(src.existingInventory);
	}

	public int getKind()
	{
		return this.kind;
	}
	public void setKind(int kind)
	{
		this.kind = kind;
	}

	public QuoteBean getQuote()
	{
		return this.quote;
	}
	public void setQuote(QuoteBean quote)
	{
		this.quote = new QuoteBean(quote);
	}

	public int getAmount()
	{
		return this.amount;
	}
	public void setAmount(int amount)
	{
		this.amount = amount;
	}

	public float getTotal()
	{
		return this.total;
	}
	public void setTotal(float total)
	{
		this.total = total;
	}
	
	public long getExpiry()
	{
		return this.expiry;
	}
	public void setExpiry(long expiry)
	{
		this.expiry = expiry;
	}

	public StockRecordBean getExistingInventory()
	{
		return this.existingInventory;
	}
	public void setExistingInventory(StockRecordBean existingInventory)
	{
		this.existingInventory = existingInventory;
	}
}
